/**
 * Aidttech.com Inc.
 * Copyright (c) 2017-2024 All Rights Reserved.
 */
package com.yunqiu.dbs.service.impl;

import com.yunqiu.dbs.service.DBService;

/**
 * @author yunqiu
 * Created by on 2024-07-22 8:43 下午
 */
public class MySqlDBService extends DBService {

    public MySqlDBService(String ip, String port, String dbName, String userName, String pwd) {
        super(ip, port, dbName, userName, pwd);
    }

    @Override
    public String getDriver() {
        return "com.mysql.cj.jdbc.Driver";
    }

    @Override
    public String getUrl(String ip,String port,String dbName) {
        return String.format("jdbc:mysql://%s:%s/%s?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true",ip,port,dbName);
    }
}